syms r theta phi;
x=r*sin(theta)*cos(phi);
y=r*sin(theta)*sin(phi);
z=r*cos(theta);
J=jacobian([x;y;z],[r theta phi])